﻿<?php
require $this->__RAD__ . 'component/global/head.php';
?>
<style>
    .header{
        background: transparent;
    }
</style>
<body>
<?php
require $this->__RAD__ . 'component/global/header.php';
?>
<div class="home ">
    <div class="banner pc">
        <div class="swiper-container home-swiper">
            <div class="swiper-wrapper">
                <?php
                if ($this->aryAd) :
                    foreach ($this->aryAd as $val) :
                        ?>
                        <div class="swiper-slide">
                            <img src="<?= $this->__CDN__ ?>pics/l/<?= $val->ad_img ?>" alt="">
                        </div>
                        <?php
                    endforeach;
                endif
                ?>
            </div>
            <!-- Add Pagination -->
            <div class="swiper-pagination"></div>
        </div>
    </div>
    <div class="banner mb">
        <div class="swiper-container home-swiper">
            <div class="swiper-wrapper">
                <?php
                if ($this->aryAd1) :
                    foreach ($this->aryAd1 as $val) :
                        ?>
                        <div class="swiper-slide">
                            <img src="<?= $this->__CDN__ ?>pics/l/<?= $val->ad_img ?>" alt="">
                        </div>
                        <?php
                    endforeach;
                endif
                ?>
            </div>
            <!-- Add Pagination -->
            <div class="swiper-pagination"></div>
        </div>
    </div>
    <div class="home-product">
        <p class="title">产品</p>
        <div class="product-swiper-box">
            <div class="swiper-container product-swiper ">
                <div class="swiper-wrapper">
                    <?php
                    if ($this->product) :
                        $_i = 1;
                        foreach ($this->product as $val) :
                            ?>
                            <div data-type="<?= $val->category_id ?>" class="swiper-slide swiper-slide-product <?= $_i == 1 ? 'active' : '' ?>">
                                <div class="img-box">
                                    <img src="<?= $this->__CDN__.'pics/l/'.$val->landscape ?>" alt="">
                                </div>
                                <p><?= $val->category_name ?></p>
                            </div>
                            <?php
                        $_i++;
                        endforeach;
                    endif;
                    ?>
                </div>
                <div class="swiper-button-prev"></div>
                <div class="swiper-button-next"></div>
            </div>
        </div>
        <!--产品列表-->
        <?php
        $_i = 1;
        foreach ($this->product as $val) :
        ?>
        <div class="products-list <?= $_i == 1 ? 'active' : '' ?>">
            <div class="w1200 clearboth">
                <!--左边-->
                <div class="left pc fl">
                    <?php
                    if ($val->aryProduct) :
                    ?>
                    <div onclick="location.href='/en/products/detail/<?= $val->aryProduct[0]->archives_id ?>'"  class="product-box">
                        <div class="img-box">
                            <img src="<?= $this->__CDN__.'pics/l/'.$val->aryProduct[0]->cover ?>" alt="<?= $val->aryProduct[0]->title ?>">
                        </div>
                        <div class="text">
                            <p><?= $val->aryProduct[0]->title ?></p>
                            <p><?= $val->aryProduct[0]->synopsis ?> </p>
                        </div>

                    </div>
                    <?php
                    endif;
                    ?>
                </div>
                <!--右边-->
                <div class="right fl">
                    <?php
                    if ($val->aryProduct) :
                        $_i=1;
                    foreach ($val->aryProduct as $_val) :
                        if ($_i != 1) :
                    ?>
                    <div onclick="location.href='/en/products/detail/<?= $_val->archives_id ?>'" class="right-box">
                        <div class="product-box">
                            <div class="img-box">
                                <img src="<?= $this->__CDN__.'pics/l/'.$_val->cover ?>" alt="<?= $_val->title ?>">
                            </div>
                            <div class="text">
                                <p><?= $_val->title ?></p>
                                <p><?= $_val->synopsis ?> </p>
                            </div>
                        </div>
                    </div>
                    <?php
                            endif;
                    $_i++;
                    endforeach;
                    endif;
                    ?>
                </div>
            </div>
            <div class="btn-box">
                <a class="btn-box-a" data-href="/en/products/index" href="/en/products/index/<?= $this->product[0]->category_id ?>">查看更多</a>
            </div>
        </div>
        <?php
        $_i++;
        endforeach;
        ?>
    </div>
    <div class="home-partner">
        <p class="title"> 合作伙伴 </p>
        <!--合作伙伴列表-->
        <div class="partner-list">
            <ul class="w1200 clearboth">
                <?php
                if ($this->aryPartner) :
                    foreach ($this->aryPartner as $val) :
                        ?>
                        <li>
                            <img src="<?= $this->__CDN__ ?>pics/l/<?= $val->cover ?>" alt="">
                        </li>
                        <?php
                    endforeach;
                endif
                ?>
            </ul>
            <div class="btn-box btn-box-2">
                <a href="/en/partner/index.php">查看更多</a>
            </div>
        </div>

    </div>
    <div class="home-information clearboth">
        <div class="home-news fl clearboth">
            <div class="news-list fr">
                <span class="big-tit">新闻</span>
                <ul>
                    <!--有图新闻-->
                    <?php
                    if ($this->aryNews[0]) :
                    ?>
                    <li class="img-li">
                        <a href="/en/news/detail/<?= $this->aryNews[0]->archives_id ?>" class="clearboth">
                            <img src="<?= $this->__CDN__.'pics/l/'.$this->aryNews[0]->cover ?>" alt="" class="fl">
                            <div class="fl text">
                                <p class="tit"> <?= $this->aryNews[0]->title ?> </p>
                                <p class="time"> <?= date("Y-m-d", $this->aryNews[0]->release_date) ?></p>
                                <p class="detail"><?= $this->aryNews[0]->synopsis ?></p>
                            </div>
                        </a>
                    </li>
                    <?php
                    endif;
                    ?>
                    <!--无图新闻-->
                    <?php
                    $_i = 1;
                    if ($this->aryNews[1]) :
                    foreach ($this->aryNews as $val) :
                        if ($_i > 1 && $_i < 4) :
                    ?>
                    <li>
                        <a href="/en/news/detail/<?= $val->archives_id ?>" class="clearboth">
                            <div class="fl text">
                                <p class="tit"> <?= $val->title ?> </p>
                                <p class="time"> <?= date("Y-m-d", $val->release_date) ?></p>
                                <p class="detail"><?= $val->synopsis ?></p>
                            </div>
                        </a>
                    </li>
                    <?php
                            endif;
                    $_i++;
                    endforeach;
                    endif;
                    ?>
                </ul>

            </div>
        </div>
        <div class="home-company  fl clearboth">
            <div class="company-list fl">
                <span class="big-tit">公司简介</span>
                <img src="<?= $this->__STATIC__ ?>images/img-02.jpg" alt="" >
                <p>路美思是一家专业制造定制和标准的电气设备，公司成立于1997，Lumex提供近18生产优质产品的表现证明年。</p>
                <a href="/en/about/index">查看更多</a>
            </div>
        </div>
    </div>
</div>

<?php
require $this->__RAD__ . 'component/global/footer.php';
?>

<script>
    $(function(){

        home.index();
    })
</script>
</body>
</html>